package com.echoplots.echoplotsspringbootstart.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @Author cos
 * @description 自定义配置
 * @date 2020/11/18
 */
@Configuration
@ConfigurationProperties(prefix="echoplots")
//指明使用的配置文件
@PropertySource("classpath:echoplots.properties")
@Component
public class EchoPlotsConfigBean {
    private String name;
    private Integer age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
